//
//  PositivePsychology.swift
//  HIextractLicve
//
//  Created by HIextractLicve on 2024/12/9.
//

import UIKit

class PositivePsychology: UIViewController {
    var eachVioViewHTLC:THLCNOrBUTTOn?
    var mindfulnessPageHTL:THLCNPageControll?
    var journeyHTLC:UIView?

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.9000)
        
        
        let livelaijtiLbl = UILabel.init()
        livelaijtiLbl.text = HTLROOOMMeasg.BinrwetioBase64("TGl2ZQ==")
        livelaijtiLbl.textColor = .white
        livelaijtiLbl.font = UIFont(name: "Trebuchet MS", size: 15)
        livelaijtiLbl.textAlignment = .center
        
        
        let postlaijtiLbl = UILabel.init()
        postlaijtiLbl.text = HTLROOOMMeasg.BinrwetioBase64("UG9zdA==")
        postlaijtiLbl.textColor = .white
        postlaijtiLbl.font = UIFont(name: "Trebuchet MS", size: 15)
        postlaijtiLbl.textAlignment = .center
      
        if self.navigationController?.navigationBar.isHidden == true {
            journeyHTLC?.alpha = 1
            journeyHTLC?.layer.cornerRadius = 12
        }
        journeyHTLC?.backgroundColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)

        eachVioViewHTLC = THLCNOrBUTTOn.init()
        eachVioViewHTLC?.setTitle("anchors", for: .normal)
        if journeyHTLC != nil {
            journeyHTLC?.addSubview(eachVioViewHTLC ?? THLCNOrBUTTOn.init())
            view.addSubview(journeyHTLC!)
        }

        mindfulnessPageHTL = THLCNPageControll()
        mindfulnessPageHTL?.numberOfPages = 1
        mindfulnessPageHTL?.backgroundColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)
        mindfulnessPageHTL?.tintColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)
        mindfulnessPageHTL?.sizeToFit()

        if journeyHTLC != nil {
            journeyHTLC?.addSubview(mindfulnessPageHTL ?? THLCNPageControll.init())
           
        }
        let abacjkbroHTLC = UIButton.init()
        let postHTLC = UIButton.init()
        let liverHTLC = UIButton.init()
        postHTLC.setImage(UIImage.init(named: "posttiezi"), for: .normal)
        liverHTLC.setImage(UIImage.init(named: "postliveHtlv"), for: .normal)
        
        
        abacjkbroHTLC.addTarget(self, action: #selector(diBakissBoockHTLC), for: .touchUpInside)
        abacjkbroHTLC.setImage(UIImage.init(named: "htlcDelte"), for: .normal)
        
       
        view.addSubview(abacjkbroHTLC)
        abacjkbroHTLC.snp.makeConstraints { make in
            make.width.height.equalTo(60)
            make.trailing.equalToSuperview().inset(12)
            make.bottom.equalToSuperview().offset(-bommbsafeHeitHTL - 70)
        }
        
        view.addSubview(postHTLC)
        postHTLC.snp.makeConstraints { make in
            make.width.height.equalTo(78)
            make.centerX.equalToSuperview()
            make.bottom.equalTo(abacjkbroHTLC.snp.top).offset(-25)
        }
        
        view.addSubview(liverHTLC)
        liverHTLC.snp.makeConstraints { make in
            make.width.height.equalTo(78)
            make.centerX.equalToSuperview()
            make.bottom.equalTo(postHTLC.snp.top).offset(-73)
        }
        
        view.addSubview(livelaijtiLbl)
        livelaijtiLbl.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.top.equalTo(liverHTLC.snp.bottom).offset(8)
        }
        view.addSubview(postlaijtiLbl)
        postlaijtiLbl.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.top.equalTo(postHTLC.snp.bottom).offset(8)
        }
        abacjkbroHTLC.addTarget(self, action: #selector(diBakissBoockHTLC), for: .touchUpInside)
        liverHTLC.addTarget(self, action: #selector(livenowHTLC), for: .touchUpInside)
        postHTLC.addTarget(self, action: #selector(postDYMHTLC), for: .touchUpInside)
        
    }
    

    @objc func diBakissBoockHTLC() {
      
      
            self.navigationController?.popToRootViewController(animated: true)
        
      
    }
    
    @objc func livenowHTLC() {
      
      
            self.navigationController?.pushViewController(StressAlleviation.init(), animated: true)
        
        
    }
    
    @objc func postDYMHTLC() {
      
      
            self.navigationController?.pushViewController(ValmMindset.init(), animated: true)
        
       
    }
}
